package org.jeecg.modules.system.entity.bo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotNull;

/**
 * @author yxp
 * @date 2024/2/7
 * @desc 文件块上传请求类
 **/
@Data
@ApiModel("文件块上传请求类")
public class ChunkUploadBo {

    @ApiModelProperty("块文件")
    @NotNull(message = "上传文件块不能为空")
    private MultipartFile chunkFile;

    @ApiModelProperty("块编号")
    private Long chunkNum;

    @ApiModelProperty("块大小")
    private Long chunkSize;

    @ApiModelProperty("文件块偏移量-主要用于断点续传")
    private Long offset;

    @ApiModelProperty("文件总大小")
    private Long fileSize;

    @ApiModelProperty("整个文件的md5值，防止传输篡改")
    private String fileMd5;

    @ApiModelProperty("是否是文件的最后一块")
    private boolean isLastChunk;

}
